package com.example.dml.observer_pattern.event;

/**
 * @Authors：gaoyang
 * @CreateTime：2021/11/2 23:49
 * @Description：todo
 */
public class MouseEventTest {

    public static void main(String[] args) {
        MouseClickCallback clickCallback = new MouseClickCallback();

        Mouse mouse = new Mouse();
        mouse.addListener(MouseEventType.ON_CLICK,clickCallback);
        mouse.addListener(MouseEventType.ON_DOUBLE_CLICK,clickCallback);
        mouse.addListener(MouseEventType.ON_MOVE,clickCallback);
        mouse.addListener(MouseEventType.ON_OVER,clickCallback);
        mouse.addListener(MouseEventType.ON_BLUR,clickCallback);

        mouse.click();
        mouse.blur();
    }
}
